<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery.min.js"></script>
    <script>
        $(function(){
            console.log($("#mydiv"));
            console.log($(".hehe"));
            console.log($("p"));
            console.log($("div p"))
            // $("p:first").css("background","red");
            // $("p:last").css("background","red");

            //索引为偶数的元素，索引从0开始
            $("p:even").css("background","yellow");

            //索引为奇数的元素，索引从0开始
            $("p:odd").css("background","pink");

            console.log($("form :password")[0]);
            console.log($("form :checked").length);
        });
    </script>
</head>
<body>
    <div id="mydiv">div01</div>
    <div class="hehe">div02</div>
    <div>div03</div>
    <div>div04</div>
    <div>div05</div>
    <p>p01</p>
    <p class="hehe">p02</p>
    <p>p03</p>
    <p>p04</p>
    <p>p05</p>
    <div>
        <p>p</p>
    </div>
    <form action="">
        <input type="text">
        <input type="password">
        <input type="checkbox" checked>
        <input type="checkbox" checked>
        <input type="checkbox" >
    </form>
</body>
</html>